package com.google.code.spidertr;
/**
 * @author ibrahim
 * 
 */
public class Pair {
	private String pre;
	private String post;

	public Pair(String pre, String post) {
		this.setPre(pre);
		this.setPost(post);
	}

	/**
	 * @param pre
	 *            the pre to set
	 */
	public void setPre(String pre) {
		this.pre = pre;
	}

	/**
	 * @return the pre
	 */
	public String getPre() {
		return pre;
	}

	/**
	 * @param post
	 *            the post to set
	 */
	public void setPost(String post) {
		this.post = post;
	}

	/**
	 * @return the post
	 */
	public String getPost() {
		return post;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((post == null) ? 0 : post.hashCode());
		result = prime * result + ((pre == null) ? 0 : pre.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Pair other = (Pair) obj;
		if (post == null) {
			if (other.post != null)
				return false;
		} else if (!post.equals(other.post))
			return false;
		if (pre == null) {
			if (other.pre != null)
				return false;
		} else if (!pre.equals(other.pre))
			return false;
		return true;
	}

}